<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>门店修改 - Layui</title>
<link rel="stylesheet" href="/layui/css/layui.css">
<link rel="stylesheet" href="/css/admin.css">
</head>
<body>
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    @include('admin.header')
  </div>
  <div class="layui-side layui-bg-black">
    @include('admin.leftadmin')
  </div>
  <div class="layui-body">
  <div>
   <form action="dochange" method="post" style="width:500px;margin-top: 20px;margin-left: 50px">
     <input type="hidden" name="thisid" value="<?php echo $str['id'];?>">
    <div class="layui-form-item">
      <label class="layui-form-label">店号</label>
      <div class="layui-input-block">
        <input type="text" name="mark" lay-verify="required" value="<?php echo $str['mark']?>" autocomplete="off" class="layui-input">
      </div>
    </div>
     <div class="layui-form-item">
      <label class="layui-form-label">店名</label>
      <div class="layui-input-block">
        <input type="text" name="shopname" lay-verify="required" value="<?php echo $str['shopname']?>" autocomplete="off" class="layui-input">
      </div>
    </div>
     <div class="layui-form-item">
      <label class="layui-form-label">店长</label>
      <div class="layui-input-block">
        <input type="text" name="shoper" lay-verify="required" value="<?php echo $str['shoper']?>" autocomplete="off" class="layui-input">
      </div>
    </div>
     <div class="layui-form-item">
      <label class="layui-form-label">联系方式</label>
      <div class="layui-input-block">
        <input type="text" name="shoperphone" lay-verify="required" value="<?php echo $str['shoperphone']?>" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">省市区</label>
      <div class="layui-input-block">
         <div id="demo2" class="citys">
          <p>
            <select name="province" style="height:35px" class="province"></select>
            <select name="city" style="height:35px"></select>
            <select name="area" style="height:35px"></select>
          </p>
         </div>
      </div>
    </div>
    <input type="hidden" value="<?php echo $str['province'];?>" name="pro" class="pro">
    <input type="hidden" value="<?php echo $str['city'];?>" name="cit" class="cit">
    <input type="hidden" value="<?php echo $str['county'];?>" name="are" class="are">
    <div class="layui-form-item" style="margin-top: 10px">
      <label class="layui-form-label">地址</label>
      <div class="layui-input-block">
        <input type="text" name="address" lay-verify="required" value="<?php echo $str['address']?>" autocomplete="off" class="layui-input">
      </div>
    </div>
     <div class="layui-form-item">
      <label class="layui-form-label">营业时间</label>
      <div class="layui-input-block">
        <input type="text" name="shophours" lay-verify="required" value="<?php echo $str['shophours']?>" autocomplete="off" class="layui-input">
      </div>
    </div>
    
     <div class="layui-form-item" style="margin-top: 20px">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit="" lay-filter="demo1">确认修改</button>          
      </div>
     </div> 




   </form>
  </div>
     
  </div>
  <div class="layui-footer">
    <!-- 底部固定区域 -->
  </div>

</body>
</html>

<script src="/layui/layui.js"></script>
<script>
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form()
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  
  
  
});



</script>
<script type="text/javascript" src="/aa/jquery.citys.js"></script>
<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"></script>
<script type="text/javascript">

  var p = $('.pro').val();
  var c = $('.cit').val();
  var w = $('.are').val();

  $('#demo2').citys({
      required:false,
      nodata:'hidden',
      onChange:function(data){
        // alert(data['area']);
         // var text = data['direct']?'(直辖市)':'';
         // console.log(data['province']);
         // $('#place').text('当前选中地区：'+data['province']+text+' '+data['city']+' '+data['area']);
         $('.pro').val(data['province']=='' ? p : data['province']);
         $('.cit').val(data['city']=='' ? c : data['city']);
         $('.are').val(data['area']=='' ? w : data['area']);
      }
  });

  
  $('#demo2').citys({valueType:'name',province:p,city:c,area:w});
 

</script>

